<template>
  <span>
    <span class="p-r grey">
      <span v-if="lockData.lockStatus == 0">当前内容可编辑</span>
      <span v-else>当前内容不可编辑</span>
    </span>
    <el-button
      v-if="lockData.lockStatus == 0"
      type="danger"
      :icon="'el-icon-lock'"
      size="mini"
      @click="lockData.click && lockData.click(lockData.lockStatus)"
    >
      锁定
    </el-button>
    <el-button
      v-else
      type="success"
      :icon="'el-icon-unlock'"
      size="mini"
      @click="lockData.click && lockData.click(lockData.lockStatus)"
    >
      解锁
    </el-button>
  </span>
</template>

<script>
export default {
  props: {
    lockData: {
      type: Object,
      default: () => {
        return {
          lockStatus: 0, //锁定0:非锁定;1:已锁定
        };
      },
    },
  },
};
</script>

<style lang="less" scoped></style>
